How to determine if a baseline is contained within a set.

Hello,

How would one determine if a baseline is contained within a Baseline set?

-Jim

 


EHcnck - Wed Mar 05 09:24:13 EST 2014

Re: How to determine if a baseline is contained within a set.
SudarshanRao - Thu Mar 06 03:21:21 EST 2014

Probably this is what you are looking for:

baselineSet(ModuleVersion)

Declaration
BaselineSet baselineSet(ModuleVersion modver)

Operation
This returns the Baseline Set, if there is one and the user has Read access to it, which contains the given ModuleVersion modver.

Thanks,
Sudarshan

Re: How to determine if a baseline is contained within a set.
EHcnck - Fri Sep 08 10:38:42 EDT 2017

SudarshanRao - Thu Mar 06 03:21:21 EST 2014

Probably this is what you are looking for:

baselineSet(ModuleVersion)

Declaration
BaselineSet baselineSet(ModuleVersion modver)

Operation
This returns the Baseline Set, if there is one and the user has Read access to it, which contains the given ModuleVersion modver.

Thanks,
Sudarshan

Am I doing something wrong if I open the module "Current" and use BaselineSet baselineSet(ModuleVersion modver) I get a valid BaselineSet which doesn't make sense.  I want the BaselineSet is it exist for an version module I open, meaning what set was this version rev op in?

 

BaselineSet getBaselineSet(ModuleVersion &mv) {
        BaselineSetDefinition bsd
        ModName_ mod = module(mv)
        for bsd in mod do {
                string errmess = read(bsd)
                if (!null errmess) {
                        return null
                } else {
                        BaselineSet bs
                        for bs in bsd do {
                                ModuleVersion v
                                for v in bs do {
                                        if (uniqueID(module(v)) == uniqueID(module(mv))) {
                                                if (versionString v == versionString mv) {
                                                        return bs
                                                }
                                        }
                                }
                        }
                }
        }

        return null
}

ModuleVersion mv = moduleVersion(current Module)
BaselineSet bs = getBaselineSet(mv)             
if (null bs) {
        ack "Null"
} else {
        ModuleVersion mv
        for mv in bs do {
                print " " (fullName mv) " [" (versionString mv) "]\n"
        }
}
delete mv